<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="TipoDocumentoEditDlg" widgetVar="TipoDocumentoEditDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.EditTipoDocumentoTitle}">
            <h:form id="TipoDocumentoEditForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{tipoDocumentoController.selected != null}">
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_idTipoDocumento}" for="idTipoDocumento" />
                        <p:inputText id="idTipoDocumento" value="#{tipoDocumentoController.selected.idTipoDocumento}" title="#{bundle.EditTipoDocumentoTitle_idTipoDocumento}" required="true" requiredMessage="#{bundle.EditTipoDocumentoRequiredMessage_idTipoDocumento}"/>
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_nombreDoc}" for="nombreDoc" />
                        <p:inputText id="nombreDoc" value="#{tipoDocumentoController.selected.nombreDoc}" title="#{bundle.EditTipoDocumentoTitle_nombreDoc}" required="true" requiredMessage="#{bundle.EditTipoDocumentoRequiredMessage_nombreDoc}"/>
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_prefijoDoc}" for="prefijoDoc" />
                        <p:inputText id="prefijoDoc" value="#{tipoDocumentoController.selected.prefijoDoc}" title="#{bundle.EditTipoDocumentoTitle_prefijoDoc}" />
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_consecutivoTipoDoc}" for="consecutivoTipoDoc" />
                        <p:inputText id="consecutivoTipoDoc" value="#{tipoDocumentoController.selected.consecutivoTipoDoc}" title="#{bundle.EditTipoDocumentoTitle_consecutivoTipoDoc}" />
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_indHabilitadotipod}" for="indHabilitadotipod" />
                        <p:selectBooleanCheckbox id="indHabilitadotipod" value="#{tipoDocumentoController.selected.indHabilitadotipod}" required="true" requiredMessage="#{bundle.EditTipoDocumentoRequiredMessage_indHabilitadotipod}"/>
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_idSucursal}" for="idSucursal" />
                        <p:selectOneMenu id="idSucursal" value="#{tipoDocumentoController.selected.idSucursal}" >
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{sucursalController.itemsAvailableSelectOne}"
                                           var="idSucursalItem"
                                           itemValue="#{idSucursalItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.EditTipoDocumentoLabel_idConceptoTipoDoc}" for="idConceptoTipoDoc" />
                        <p:selectOneMenu id="idConceptoTipoDoc" value="#{tipoDocumentoController.selected.idConceptoTipoDoc}" >
                            <f:selectItem itemLabel="#{bundle.SelectOneMessage}"/>
                            <f:selectItems value="#{conceptoTipoDocController.itemsAvailableSelectOne}"
                                           var="idConceptoTipoDocItem"
                                           itemValue="#{idConceptoTipoDocItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{tipoDocumentoController.update}" value="#{bundle.Save}" update="display,:TipoDocumentoListForm:datalist,:growl" oncomplete="handleSubmit(args, 'TipoDocumentoEditDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="TipoDocumentoEditDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
